#ifndef LOOPBACK_H
#define LOOPBACK_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

/* Loopback test debug message printout enable */
#define _LOOPBACK_DEBUG_

/* DATA_BUF_SIZE define for Loopback example */
#ifndef DATA_BUF_SIZE
#define DATA_BUF_SIZE 2048
#endif

/************************/
/* Select LOOPBACK_MODE */
/************************/
#define LOOPBACK_MAIN_NOBLOCK 0
#define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK

/* TCP server Loopback test example */
int32_t loopback_tcps(uint8_t sn, uint8_t *buf, uint16_t port);

/* TCP client Loopback test example */
int32_t loopback_tcpc(uint8_t sn, uint8_t *buf, uint8_t *destip,
                      uint16_t destport);

/* UDP Loopback test example */
int32_t loopback_udps(uint8_t sn, uint8_t *buf, uint16_t port);

/* UDP Client Loopback test example */
int32_t loopback_udpc(uint8_t sn, uint8_t *buf, uint8_t *destip,
                      uint16_t destport);
#ifdef __cplusplus
}
#endif

#endif

// #ifndef __HTTP_SERVER_H__
// #define __HTTP_SERVER_H__

// #include "wizchip_conf.h"

// void http_server_init(uint8_t sock, uint16_t port);
// void http_requests_process(void);

// void add_sensor_data(uint16_t co2, uint16_t pm25);
// void http_server_init(uint8_t sock, uint16_t port);
// void generate_chart_svg(char* buffer, uint16_t* data, const char* color,
// const char* title, uint16_t max_value);

// #endif /* __HTTP_SERVER_H__ */
